home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** $VER: swfplayer.h 0.4 (03.10.02)
- ** Description
- **
- ** (C) Copyright 1999 Paul Hill
- ** (C) Copyright 2002 Alexandre Balaban
- **
- ** $HISTORY :
- ** - 0.4, 03.10.02 : Added LOOPPLAY in menu ID enum
- ** - 0.3, 05.09.02 : Added TRACE macro for debuging
- ** - 0.2, 27.07.02 : New attributes added into _swfinfo struct
- ** - 0.1, 27.02.99 : Original version by Paul Hill
- **
- */
-
- #ifndef SWFPLAYER_H
- #define SWFPLAYER_H
-
- #include "flash.h"
-
-
- struct _swfinfo
- {
- struct Screen *screen; /* The screen our window lives on */
- struct Window *window; /* The window we render ShockWave gfx to */
- struct FlashInfo fi; /* Handle for the Flash lib */
- char *filename; /* Filename of the current SWF file */
- struct RastPort *rport; /* RastPort of out window */
- struct RastPort *tmprport; /* Temp rastport for kick3.0 writepixelarray() */
- UWORD winbordertop; /* win->bordertop */
- UWORD winborderleft; /* win->borderleft */
- struct Menu *SWFPlayerMenus; /* Our window's menus */
- struct Task *task; /* Our task */
- ULONG filesize; /* Filesize of the current SWF file */
- char *buffer; /* */
- UBYTE *pubscreenname; /* */
- // ULONG modeid; /* ModeId of screen to use (fullscreen only) */
- UWORD width; /* Width of the SWF file */
- UWORD height; /* Height of the SWF file */
- UWORD depth; /* Depth of our screen */
- UBYTE kick31; /* Are we running on > kickstart 3.1 ? */
- // UBYTE fullscreen; /* Are we running in full screen mode */
- // UBYTE displayinuse; /* If TRUE don't directly access the screens bitplanes */
- // UBYTE usefastc2p; /* Should we use a custom fast C2P routine? (only available in fullscreen bitplane mode) */
- UBYTE oldtaskpri;
- FlashDisplay * fd;
- };
-
- enum { OPT_FILE=0,
- OPT_PUBSCREEN,
- OPT_INFO,
- OPT_MONO,
- OPT_MAXWIDTH,
- OPT_MAXHEIGHT,
- OPT_ACTIVEPLAY,
- OPT_COUNT };
-
- enum { MENU_OPEN=1,
- MENU_INFO,
- MENU_ABOUT,
- MENU_QUIT,
- MENU_PAUSE,
- MENU_CONTINUE,
- MENU_REWIND,
- MENU_ZOOMIN,
- MENU_ZOOMOUT,
- MENU_STEP,
- MENU_SEPERATE,
- MENU_VOLOFF,
- MENU_VOLQUIET,
- MENU_VOLLOUD,
- MENU_SAFEASDEF,
- MENU_LOOPPLAY, // [ABA, 03/10/2002 : added LOOP setting menu]
- MENU_MAX };
-
- extern struct _swfinfo swfinfo;
- extern struct WBStartup *_WBenchMsg;
- extern struct timerequest *TimerIO;
- extern struct MsgPort *TimerMP;
- extern LONG args[OPT_COUNT];
-
- int open_swf_window( );
- void close_swf_window( );
- ULONG playMovie( FlashHandle flashHandle, struct Screen *screen, struct Window *movie );
- void swf_showinfo( );
- void showUrl( char * url, char * target, void * client_data);
-
- #define MAXPATH 1024
-
- //#define DEBUG
- #ifdef DEBUG
- #define TRACE printf
- #else
- #define TRACE(fmt,args...)
- #endif
-
- #endif /* SWFPLAYER_H */
-